package com.farm.decorator;


import com.farm.AgriculturalMachine;

// 装饰器抽象类
abstract class MachineDecorator extends AgriculturalMachine {
    protected AgriculturalMachine decoratedMachine;

    public MachineDecorator(AgriculturalMachine decoratedMachine) {
        this.decoratedMachine = decoratedMachine;
    }

    @Override
    public void operate(String machineName) {
        decoratedMachine.operate(machineName);
    }

    @Override
    public String getDescription() {
        return decoratedMachine.getDescription();
    }
}

